package com.aaa.system.controller.api;

import com.aaa.entity.Dept;
import com.aaa.system.service.DeptService;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: aaa-his-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-12-08 11:52
 **/
@RestController
@RequestMapping("system/api/dept")
public class ApiDeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("/getAll")
    public Result<List<Dept>> getAll(){
        return new Result<>(200,"查询成功",deptService.findAll());
    }
}
